package com.atguigu.boot.controller;

import com.atguigu.boot.bean.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : leimingchao
 * @date Date : 2021年11月13日 22:13
 */
@RestController
public class HelloController {

    @Autowired
    private Person person;

    @GetMapping(value = "/person")
    public Person person() {
        String userName = person.getUserName();
        System.out.println(userName);
        return person;
    }
}
